package com.th.supcom.pds.deptdispensary.client.widget;

import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.TabItem;
import com.extjs.gxt.ui.client.widget.TabPanel;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;

/**
 * NurseUnitVsDispensary主面板.
 * 
 * 护理单元与药房关系配置.
 * 
 * @author 杨冲
 */
public class DeptVsDispensaryMainPanel extends LayoutContainer
{
    private DeptVsDispensaryTabPanel m_deptVsDispensaryTabPanel;
    private DispenseTypeTabPanel m_dispenseTypeTabPanel;
    private PhamMeterialTypeTabPanel m_meterialTypeTabPanel;

    public DeptVsDispensaryMainPanel ()
    {
        initTabPanels ();
        initUI ();
    }

    /**
     * 初始化UI控件.
     * 
     */
    private void initUI ()
    {
        setLayout (new FitLayout ());

        TabPanel tabPanel = new TabPanel ();
        TabItem deptItem = new TabItem ("科室药房配置");
        deptItem.setLayout (new FitLayout ());
        deptItem.add (m_deptVsDispensaryTabPanel);
        TabItem dispenseTypeItem = new TabItem ("摆药类型药房配置");
        dispenseTypeItem.setLayout (new FitLayout ());
        dispenseTypeItem.add (m_dispenseTypeTabPanel);
        TabItem phamMeterialTypeItem = new TabItem ("药品材质药房配置");
        phamMeterialTypeItem.setLayout (new FitLayout ());
        phamMeterialTypeItem.add (m_meterialTypeTabPanel);

        tabPanel.add (deptItem);
        tabPanel.add (dispenseTypeItem);
        tabPanel.add (phamMeterialTypeItem);

        add (tabPanel);
    }

    /**
     * 初始化Tab面板
     */
    private void initTabPanels ()
    {
        m_deptVsDispensaryTabPanel = new DeptVsDispensaryTabPanel ();
        m_dispenseTypeTabPanel = new DispenseTypeTabPanel ();
        m_meterialTypeTabPanel = new PhamMeterialTypeTabPanel ();
    }

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";
}